package com.youyou.action;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

@Aspect
@Component
@Order(1)
public class Dog2 {
   @Around("execution(* com.youyou.action.GirlAction.*(..))")
    public Object testDod2(ProceedingJoinPoint pjp) throws Throwable {
       System.out.println("Dod2为偷窥狗狗哦");
       Object proceed = pjp.proceed();
       Object[] args=pjp.getArgs();
       for (Object agr:args
            ) {
           if (agr instanceof String){
               System.out.println("偷窥女生看书");

           }
       }
       Object proceedresult = pjp.proceed();
       System.out.println("鸟不拉几的Dog2，成事不足败事有余");
       return proceedresult;
    }
}
